<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@taglib prefix="t" tagdir="/WEB-INF/tags/" %>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<t:main>
	<header class="entry-header">
		<h1 class="entry-title">Danh sách sinh viên</h1>											
	</header>

	<table class="list">
		<thead>
			<tr>
				<td> Mã sinh viên </td>
				<td> Họ tên </td>
				<td> Lớp </td>
				<td> Khoa </td>
				<td> Địa chỉ </td>
				<td> Ngày sinh </td>
				<td> Giới tính </td>
			</tr>
		</thead>
		<tbody>

			<c:forEach var="sinhVien" items="${lstSinhVien}">
				<tr>
					<td> <c:out value="${sinhVien.getMaSinhVien()}" /> </td>
					<td> <c:out value="${sinhVien.getHoTen()}" /> </td>
					<td> <c:out value="${sinhVien.getLop().getTenLop()}" /> </td>
					<td> <c:out value="${sinhVien.getLop().getKhoa().getTenKhoa()}" /> </td>
					<td> <c:out value="${sinhVien.getDiaChi()}" /> </td>
					<td> <c:out value="${sinhVien.getNgaySinh()}" /> </td>
					<td>
						<c:choose>
							<c:when test="${sinhVien.isGioiTinh()}">
								<c:out value="Nữ" />
							</c:when>
							<c:otherwise>
								<c:out value="Nam" />
							</c:otherwise>
						</c:choose>
					</td>
				</tr>
			</c:forEach>

		</tbody>
	</table>
</t:main>